/*
@author https://yunp.top
 */
package js


open external class Array<T> {
    companion object {
        fun <T> from(
            arrayLike: dynamic,
            mapFn: (element: dynamic, index: Int) -> Unit = definedExternally,
            thisArg: dynamic = definedExternally
        ): Array<T>

        fun isArray(arrayLike: dynamic): Boolean

        fun <T> of(vararg elements: T): Array<T>
    }

    fun at(index: Int): T

    fun concat(vararg elements: Array<T>): Array<T>

    fun copyWithin(target: Int, start: Int, end: Int): Array<T>

    fun entries(): dynamic

    fun every(callbackFn: (element: T, index: Int, array: Array<T>) -> Unit, thisArg: dynamic = definedExternally)

    // TODO doc ref https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/Array
}